-- GENERATED SPELL FOR [Doomwalker] --


function spell0_17711(pUnit, Event) --@Crush Armor,n/a--
pUnit:FullCastSpellOnTarget(33661,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17711', 30269, 1)
end

function spell1_17711(pUnit, Event) --@Earthquake,Self--
pUnit:FullCastSpellOnTarget(32686,pUnit)
pUnit:RegisterEvent('Sorts_17711', 8000, 1)
end

function spell2_17711(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(33653,pUnit)
pUnit:RegisterEvent('Sorts_17711', 524, 1)
end

function spell3_17711(pUnit, Event) --@Lightning Wrath,n/a--
pUnit:FullCastSpellOnTarget(33665,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17711', 578, 1)
end

function spell4_17711(pUnit, Event) --@Overrun,Self--
pUnit:FullCastSpellOnTarget(32637,pUnit)
pUnit:RegisterEvent('Sorts_17711', 250, 1)
end

function Sorts_17711(pUnit, Event)
local choix_sorts_17711 = math.random(0, 4)
if choix_sorts_17711 == 0 then
pUnit:RegisterEvent('spell0_17711', 1, 1)
end
if choix_sorts_17711 == 1 then
pUnit:RegisterEvent('spell1_17711', 1, 1)
end
if choix_sorts_17711 == 2 then
pUnit:RegisterEvent('spell2_17711', 1, 1)
end
if choix_sorts_17711 == 3 then
pUnit:RegisterEvent('spell3_17711', 1, 1)
end
if choix_sorts_17711 == 4 then
pUnit:RegisterEvent('spell4_17711', 1, 1)
end
end

function mob17711_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17711', math.random(1500, 3000), 1)
end

function mob17711_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17711_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17711_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17711, 1, 'mob17711_Action')
RegisterUnitEvent(17711, 2, 'mob17711_Leave')
RegisterUnitEvent(17711, 3, 'mob17711_Kill')
RegisterUnitEvent(17711, 4, 'mob17711_Die')
